package com.mydubbo.test.netty;

import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelHandler;

public class BizHandler extends SimpleChannelHandler {
	
	 @Override
	 public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
		 	System.out.println("连接成功, channel: " + e.getChannel().toString());
	 }

	@Override
	public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
		super.messageReceived(ctx, e);
		String message = (String)e.getMessage();
		System.out.println("收到消息：" + message);
	}

}
